package com.xioaming.coupon.feign;

import com.xiaoming.coupon.vo.CommonResponse;
import com.xiaoming.coupon.vo.SettlementInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 优惠券结算微服务 Feign 接口定义
 * @author xiaoming
 * @Date 2020/6/15
 */
@FeignClient(value = "eureka-client-coupon-settlement")
public interface SettlementClient {

    /**
     * 优惠券规则计算
     * @param settlementInfo
     * @return
     */
    @RequestMapping(value = "/coupon-settlement/settlement/compute")
    CommonResponse<SettlementInfo> computeRule(@RequestBody SettlementInfo settlementInfo);
}
